Skip to content

SONARJAVA-5049 Add CheckListGenerator#4818

Merged
irina-batinic-sonarsource merged 26 commits intomasterfrom
irina/SONARJAVA-5049
Jun 24, 2024
Merged

SONARJAVA-5049 Add CheckListGenerator#4818
irina-batinic-sonarsource merged 26 commits intomasterfrom
irina/SONARJAVA-5049

Conversation

@irina-batinic-sonarsource
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread sonar-java-plugin/pom.xml Outdated
Comment thread sonar-java-plugin/src/main/java/org/sonar/plugins/java/CheckListGenerator.java Outdated
Comment thread sonar-java-plugin/src/main/java/org/sonar/plugins/java/CheckListGenerator.java Outdated
@irina-batinic-sonarsource irina-batinic-sonarsource force-pushed the irina/SONARJAVA-5049 branch 3 times, most recently from c26054f to e82a951 Compare June 20, 2024 15:54
@irina-batinic-sonarsource irina-batinic-sonarsource marked this pull request as ready for review June 21, 2024 12:45
Copy link
Copy Markdown
Contributor

@ValentinAebi-sonar ValentinAebi-sonar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to change the name of the class to GeneratedCheckList? Would it not be better to merely generate a class named CheckList?

Apart from this and the comment below, seems good to me

Comment thread check-list/src/main/java/org/sonar/java/CheckListGenerator.java Outdated
Comment thread check-list/src/main/java/org/sonar/java/CheckListGenerator.java Outdated
Comment thread check-list/src/main/java/org/sonar/java/CheckListGenerator.java
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff, just a couple of minor comments. My main concern is if we now need a multi-step process to build

Comment thread .cirrus.yml Outdated
Comment on lines +183 to +184
- mvn clean install -Dmaven.test.skip=true
- mvn compile --projects java-checks-test-sources --also-make-dependents
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do this in two steps now? Is the documentation we need to update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command that was used before, mvn clean compile --projects java-checks-test-sources --also-make-dependents, if executed before compiling the whole project, fails because of compilation errors (GeneratedCheckList class doesn't exist).
Now, I updated the script a bit to fix it without building the whole project (see the latest version of this file).
Also, yes, the documentation needed a minor update, and it has been added.

Comment thread check-list/src/main/java/org/sonar/java/CheckListGenerator.java Outdated
Comment thread check-list/src/main/java/org/sonar/java/CheckListGenerator.java Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me, let's just remove sonarpedia.json and S1135.json from the PR and then we can merge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this and sonarpedia.json update do not belong to this PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we completely remove it, some checks will fail.
S1135 is enabled on tests, but it had a Main scope defined.
I will create a separate PR to fix S1135 and remove it from this one.

@sonarqube-next
Copy link
Copy Markdown

@irina-batinic-sonarsource irina-batinic-sonarsource enabled auto-merge (squash) June 24, 2024 10:32
@irina-batinic-sonarsource irina-batinic-sonarsource merged commit c9933de into master Jun 24, 2024
@irina-batinic-sonarsource irina-batinic-sonarsource deleted the irina/SONARJAVA-5049 branch June 24, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants